<template>
  <div class="brand">
    <div class="home_title">品牌制造商直供</div>
    <ul>
      <li v-for="item in picArr" :key="item.id" @click="onClick(item.id)">
        <img :src="item.pic_url" alt="" width="100%" />
        <h4>{{ item.name }}</h4>
        <p>￥ {{ item.floor_price.toFixed(2) }} 元</p>
      </li>
    </ul>
  </div>
</template>
 
<script>
export default {
  props: ["picArr"],
  data() {
    return {};
  },
  methods: {
    onClick(id) {
      this.$router.push("/brand/" + id);
    },
  },
};
</script>
 
<style lang = "less" scoped>
.brand {
  background-color: #fff;
  margin-top: 20px;
  margin-bottom: 20px;
  .home_title {
    text-align: center;
    height: 50px;
    line-height: 50px;
    font-size: 20px;
    /* border:1px solid #999; */
  }
  ul {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    li {
      width: 49%;
      position: relative;
      h4 {
        position: absolute;
        top: 10px;
        left: 10px;
        font-size: 20px;
      }
      p {
        position: absolute;
        top: 40px;
        left: 10px;
        color: #8b0000;
      }
    }
  }
}
</style>